<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html" 
	xmlns:f="http://java.sun.com/jsf/core" 
	xmlns:p="http://primefaces.org/ui">
<h:body>
	<p:dialog widgetVar="dialogoVisualizarHistoricoConstrutoraWidget" 
	    id="dialogoIdVisualizarHistoricoConstrutora" height="460" width="940" modal="true"
		closable="true" draggable="false" resizable="false" header="Visualização do Histórico">
		<h:form id="formVisualizarHistoricoConstrutora" prependId="false">
			<p:dataTable id="listaDeHistoricos" value="#{construtoraMB.historicos}" var="historico" emptyMessage="#{bundle.noRecords}" paginator="true" rows="5"
					paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
					rowsPerPageTemplate="5">
					
			<p:column headerText="Data" width="65">
				<h:outputFormat value="#{historico.data}" converter="javax.faces.DateTime"/>
			</p:column>
			
			<p:column headerText="Histórico">
			    <h:inputTextarea value="#{historico.historico}" readonly="true" cols="130" rows="3" style="border-color: #DODODO;"/>
			</p:column>
			
			</p:dataTable>
			
			<p:commandButton value="Ok" icon="ui-icon-arrow-1-w" actionListener="#{construtoraMB.limparHistorico()}"
					onclick="dialogoVisualizarHistoricoConstrutoraWidget.hide();" />
			<p:commandButton value="Gerar PDF" ajax="false" >
				<p:dataExporter target="listaDeHistoricos" type="pdf" fileName="Historicos" postProcessor="#{construtoraMB.preProcessPDF}" />
			</p:commandButton>
		</h:form>
	</p:dialog>
</h:body>
</html>